package com.chuangjiangx.member.coupon.ddd.domain.model;

/**
 * Created by Lenovo on 2018/8/30.
 */
public enum WxVerifyStatus {
    NOT_VERIFY("微信未核销",0),
    VERIFIED("微信已核销",1),
    INVALID("微信已失效",2);

    public final String name;
    public final Integer code;

    WxVerifyStatus(String name, Integer code) {
        this.name = name;
        this.code = code;
    }

    public static WxVerifyStatus getWxVerifyStatus(Integer code) {
        for (WxVerifyStatus wxVerifyStatus : values()) {
            if (wxVerifyStatus.code.equals(code)) {
                return wxVerifyStatus;
            }
        }
        return null;
    }
}
